<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GMimeTextPart: GMime 3.0 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GMime 3.0 Reference Manual">
<link rel="up" href="MimeParts.html" title="MIME Messages and Parts">
<link rel="prev" href="GMimePart.html" title="GMimePart">
<link rel="next" href="GMimeMultipart.html" title="GMimeMultipart">
<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#GMimeTextPart.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#GMimeTextPart.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="MimeParts.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GMimePart.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GMimeMultipart.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GMimeTextPart"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GMimeTextPart.top_of_page"></a>GMimeTextPart</span></h2>
<p>GMimeTextPart — textual MIME parts</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GMimeTextPart.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="GMimeTextPart.html" title="GMimeTextPart"><span class="returnvalue">GMimeTextPart</span></a> *
</td>
<td class="function_name">
<a class="link" href="GMimeTextPart.html#g-mime-text-part-new" title="g_mime_text_part_new ()">g_mime_text_part_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GMimeTextPart.html" title="GMimeTextPart"><span class="returnvalue">GMimeTextPart</span></a> *
</td>
<td class="function_name">
<a class="link" href="GMimeTextPart.html#g-mime-text-part-new-with-subtype" title="g_mime_text_part_new_with_subtype ()">g_mime_text_part_new_with_subtype</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="GMimeTextPart.html#g-mime-text-part-get-charset" title="g_mime_text_part_get_charset ()">g_mime_text_part_get_charset</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GMimeTextPart.html#g-mime-text-part-set-charset" title="g_mime_text_part_set_charset ()">g_mime_text_part_set_charset</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="GMimeTextPart.html#g-mime-text-part-get-text" title="g_mime_text_part_get_text ()">g_mime_text_part_get_text</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GMimeTextPart.html#g-mime-text-part-set-text" title="g_mime_text_part_set_text ()">g_mime_text_part_set_text</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GMimeTextPart.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody><tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GMimeTextPart.html#GMimeTextPart-struct" title="struct GMimeTextPart">GMimeTextPart</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GMimeTextPart.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    GObject
    <span class="lineart">╰──</span> <a class="link" href="GMimeObject.html" title="GMimeObject">GMimeObject</a>
        <span class="lineart">╰──</span> <a class="link" href="GMimePart.html" title="GMimePart">GMimePart</a>
            <span class="lineart">╰──</span> GMimeTextPart
</pre>
</div>
<div class="refsect1">
<a name="GMimeTextPart.description"></a><h2>Description</h2>
<p>A <a class="link" href="GMimeTextPart.html" title="GMimeTextPart"><span class="type">GMimeTextPart</span></a> represents any text MIME part.</p>
</div>
<div class="refsect1">
<a name="GMimeTextPart.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="g-mime-text-part-new"></a><h3>g_mime_text_part_new ()</h3>
<pre class="programlisting"><a class="link" href="GMimeTextPart.html" title="GMimeTextPart"><span class="returnvalue">GMimeTextPart</span></a> *
g_mime_text_part_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Creates a new text MIME part object with a default content-type of
text/plain.</p>
<div class="refsect3">
<a name="g-mime-text-part-new.returns"></a><h4>Returns</h4>
<p> an empty MIME Part object with a default content-type of
text/plain.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-text-part-new-with-subtype"></a><h3>g_mime_text_part_new_with_subtype ()</h3>
<pre class="programlisting"><a class="link" href="GMimeTextPart.html" title="GMimeTextPart"><span class="returnvalue">GMimeTextPart</span></a> *
g_mime_text_part_new_with_subtype (<em class="parameter"><code>const <span class="type">char</span> *subtype</code></em>);</pre>
<p>Creates a new text MIME part with a sepcified subtype.</p>
<div class="refsect3">
<a name="g-mime-text-part-new-with-subtype.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>subtype</p></td>
<td class="parameter_description"><p>textual subtype string</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-text-part-new-with-subtype.returns"></a><h4>Returns</h4>
<p> an empty text MIME part object with the specified subtype.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-text-part-get-charset"></a><h3>g_mime_text_part_get_charset ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
g_mime_text_part_get_charset (<em class="parameter"><code><a class="link" href="GMimeTextPart.html" title="GMimeTextPart"><span class="type">GMimeTextPart</span></a> *mime_part</code></em>);</pre>
<p>Gets the value of the charset parameter on the Content-Type header.</p>
<div class="refsect3">
<a name="g-mime-text-part-get-charset.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>mime_part</p></td>
<td class="parameter_description"><p>a <a class="link" href="GMimeTextPart.html" title="GMimeTextPart"><span class="type">GMimeTextPart</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-text-part-get-charset.returns"></a><h4>Returns</h4>
<p> the value of the charset parameter or <code class="literal">NULL</code> if unavailable.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-text-part-set-charset"></a><h3>g_mime_text_part_set_charset ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_mime_text_part_set_charset (<em class="parameter"><code><a class="link" href="GMimeTextPart.html" title="GMimeTextPart"><span class="type">GMimeTextPart</span></a> *mime_part</code></em>,
                              <em class="parameter"><code>const <span class="type">char</span> *charset</code></em>);</pre>
<p>Sets the charset parameter on the Content-Type header to the specified value.</p>
<div class="refsect3">
<a name="g-mime-text-part-set-charset.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>mime_part</p></td>
<td class="parameter_description"><p>a <a class="link" href="GMimeTextPart.html" title="GMimeTextPart"><span class="type">GMimeTextPart</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>charset</p></td>
<td class="parameter_description"><p>the name of the charset</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-text-part-get-text"></a><h3>g_mime_text_part_get_text ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
g_mime_text_part_get_text (<em class="parameter"><code><a class="link" href="GMimeTextPart.html" title="GMimeTextPart"><span class="type">GMimeTextPart</span></a> *mime_part</code></em>);</pre>
<p>Gets the text content of the <em class="parameter"><code>mime_part</code></em>
 as a string.</p>
<div class="refsect3">
<a name="g-mime-text-part-get-text.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>mime_part</p></td>
<td class="parameter_description"><p>a <a class="link" href="GMimeTextPart.html" title="GMimeTextPart"><span class="type">GMimeTextPart</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-text-part-get-text.returns"></a><h4>Returns</h4>
<p> a newly allocated string containing the utf-8 encoded text content.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-text-part-set-text"></a><h3>g_mime_text_part_set_text ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
g_mime_text_part_set_text (<em class="parameter"><code><a class="link" href="GMimeTextPart.html" title="GMimeTextPart"><span class="type">GMimeTextPart</span></a> *mime_part</code></em>,
                           <em class="parameter"><code>const <span class="type">char</span> *text</code></em>);</pre>
<p>Sets the specified text as the content and updates the charset parameter on the Content-Type header.</p>
<div class="refsect3">
<a name="g-mime-text-part-set-text.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>mime_part</p></td>
<td class="parameter_description"><p>a <a class="link" href="GMimeTextPart.html" title="GMimeTextPart"><span class="type">GMimeTextPart</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>text</p></td>
<td class="parameter_description"><p>the text in utf-8</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="GMimeTextPart.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GMimeTextPart-struct"></a><h3>struct GMimeTextPart</h3>
<pre class="programlisting">struct GMimeTextPart;</pre>
<p>A text MIME part object.</p>
<div class="refsect3">
<a name="GMimeTextPart.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody></tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.32</div>
</body>
</html>